package com.ruoyi.app.controller;

import com.ruoyi.app.domain.Department;
import com.ruoyi.app.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("department")
@RestController
public class DepartmentController {
    @Autowired
    private DepartmentService departmentService;

    @RequestMapping("list")
    public List<Department> list(Integer hospitalId)
    {
        return departmentService.getlist(hospitalId);
    }
}
